home *** CD-ROM | disk | FTP | other *** search
- Newsgroups: comp.sources.misc
- From: darcy@druid (D'Arcy J.M. Cain)
- Subject: v26i105: feedpipe - feed a process to a pipe, Part01/01
- Message-ID: <1991Dec13.170917.26795@sparky.imd.sterling.com>
- X-Md4-Signature: 58585f9551d009cbf949398f18cc0115
- Date: Fri, 13 Dec 1991 17:09:17 GMT
- Approved: kent@sparky.imd.sterling.com
-
- Submitted-by: darcy@druid (D'Arcy J.M. Cain)
- Posting-number: Volume 26, Issue 105
- Archive-name: feedpipe/part01
- Environment: UNIX, ANSI-C
-
- For information see README. For convenience this is the first file in
- the shar distribution. Note that an ANSI compiler is required.
-
- #!/bin/sh
- # This is a shell archive (produced by shar 3.49)
- # To extract the files from this archive, save it to a file, remove
- # everything above the "!/bin/sh" line above, and type "sh file_name".
- #
- # made 12/08/1991 15:59 UTC by darcy@druid
- # Source directory /usr/darcy/work/feedpipe
- #
- # existing files WILL be overwritten
- #
- #
- #
- #
- # This shar contains:
- # length mode name
- # ------ ---------- ------------------------------------------
- # 1777 -rw-r----- README
- # 1461 -rw-r----- feedpipe.1
- # 4306 -rw-r----- feedpipe.c
- # 1610 -rw-r----- readcfg.c
- # 5377 -rw-r----- getline.c
- # 1613 -rw-rw-r-- Makefile
- # 351 -rw-r----- feedpipe.h
- #
- if test -r _shar_seq_.tmp; then
- echo 'Must unpack archives in sequence!'
- echo Please unpack part `cat _shar_seq_.tmp` next
- exit 1
- fi
- # ============= README ==============
- sed 's/^X//' << 'SHAR_EOF' > 'README' &&
- Feedpipe is a program to make processes appear as files (actually a named
- pipe) to other processes. A trivial use of this would be as a random sig
- generator. More useful is to make current information available as a file
- to processes such as UUCP.
- X
- Also included as it is used by feedpipe is my getline function. Note this
- is not quite like the BSD getline. See that file for details.
- X
- A man page is provided as feedpipe.1
- X
- Here is a sample configuration file for it which demonstrates some of the
- uses to which I am putting it.
- X
- ----------------------- Start of configuration file --------------------------
- # Configuration file for feedpipe
- # Written by D'Arcy J.M. Cain
- X
- # This file contains the information used by feedpipe to create files
- X
- # First the information files. The program pubinfo is basically a cat
- # from a here file. The second entry is the compressed version
- /usr/spool/uucppublic/pub/info/readme uucp uucp 0644 \
- X /usr/lbin/pubinfo
- /usr/spool/uucppublic/pub/info/readme.Z uucp uucp 0644 \
- X /usr/lbin/pubinfo | /usr/lbin/compress
- X
- # ls -lR of my public directories - note use of echo and date
- /usr/spool/uucppublic/pub/info/ls-lR.Z uucp uucp 0644 \
- X (echo "ls -lR as of \c"; date; ls -lR /usr/spool/uucppublic/pub) | \
- X /usr/lbin/compress
- X
- # This is the UUCP clone that I am working on. Note pa is a program that
- # creates a cpio archive of a directory and writes it to its stdout. this
- # causes the very latest version of the source tree to be made available
- # to UUCP
- /usr/spool/uucppublic/pub/archive/uudos.CP.Z darcy program 0644 \
- X cd /usr/darcy; /usr/lbin/pa uudos 2> /dev/null
- ------------------------- end of configuration file --------------------------
- X
- Any comments, bugs, suggestions etc welcome
- X
- D'Arcy J.M. Cain
- darcy@druid.UUCP
- X
- SHAR_EOF
- chmod 0640 README ||
- echo 'restore of README failed'
- Wc_c="`wc -c < 'README'`"
- test 1777 -eq "$Wc_c" ||
- echo 'README: original size 1777, current size' "$Wc_c"
- # ============= feedpipe.1 ==============
- sed 's/^X//' << 'SHAR_EOF' > 'feedpipe.1' &&
- .TH FEEDPIPE 1L "Local Command"
- .SH NAME
- .B feedpipe\^
- - Feed pipe from command after pipe starts being read
- .SH SYNOPSIS
- .B feedpipe\^
- config_file
- .SH DESCRIPTION
- .B Feedpipe
- runs a specified command writing the output to a specified
- pipe. After opening the pipe it removes the pipe name and forks
- a new process to
- do the same thing again.
- .PP
- The open for writing on the pipe will block until someone opens
- the other end. This means that the command to be run will be
- run only when someone reads the pipe. This is designed to make
- the output of the pipe up to date.
- .PP
- The
- .I config_file
- is used to tell
- .B feedpipe
- the details of the feeds. Each line causes a process to be forked and
- a feed started. The lines are separated into the following space
- delimited fields:
- .sp
- .nf
- .in +4
- Name of pipe
- owner of pipe ("-" means uid of running process)
- group of pipe ("-" means gid of running process)
- mode to open pipe in
- Command to feed to pipe
- .in -4
- .PP
- The command to send consists of all text starting at the second field.
- The sequence backslash followed by a newline is ignored allowing large
- lines to be split up for readability. Everything following the "#"
- character is ignored as are blank lines after the above substitutions.
- No further pre-processing is done on the line so any backslashes, other
- than those preceding a newline, are passed to the command.
- .SH CAVEAT
- You should never put the program to run in a directory writeable by UUCP.
- SHAR_EOF
- chmod 0640 feedpipe.1 ||
- echo 'restore of feedpipe.1 failed'
- Wc_c="`wc -c < 'feedpipe.1'`"
- test 1461 -eq "$Wc_c" ||
- echo 'feedpipe.1: original size 1461, current size' "$Wc_c"
- # ============= feedpipe.c ==============
- sed 's/^X//' << 'SHAR_EOF' > 'feedpipe.c' &&
- /*
- feedpipe.c
- Written by D'Arcy J.M. Cain
- X
- Feeds command to a named pipe
- */
- X
- #include <stdio.h>
- #include <stdlib.h>
- #include <process.h>
- #include <signal.h>
- #include <io.h>
- #include <string.h>
- #include <errno.h>
- #include <malloc.h>
- #include <pwd.h>
- #include <grp.h>
- #include <sys/stat.h>
- #include "feedpipe.h"
- X
- /* globals */
- FP_CFG *fp_cfg;
- char *progname;
- X
- static char *f_name;
- X
- static void cleanup(int sig)
- {
- X unlink(f_name);
- X exit(sig);
- }
- X
- /* function called for each line in configuration file */
- static void feedpipe(FP_CFG fc)
- {
- X int child, k, uid, gid;
- X FILE *pipe_fp, *fp;
- X
- X /* fork and check for error */
- X if ((child = fork()) == -1)
- X {
- X fprintf(stderr, "%s: Can't fork (%s)\n", progname, strerror(errno));
- X exit(3);
- X }
- X
- X /* if no error and parent process then return immediately */
- X if (child)
- X return;
- X
- X /* we are now a new process with a command to run */
- X f_name = fc.name;
- X
- X signal(SIGHUP, cleanup);
- X signal(SIGINT, cleanup);
- X signal(SIGTERM, cleanup);
- X
- X /* the child doesn't need this array */
- X free(fp_cfg);
- X
- X /* mode is for permissions only - it's always a pipe */
- X fc.mode &= 000777;
- X fc.mode |= S_IFIFO;
- X
- X if (fc.owner == NULL)
- X uid = getuid();
- X else
- X {
- X struct passwd *pw;
- X
- X if ((pw = getpwnam(fc.owner)) == NULL)
- X {
- X fprintf(stderr, "%s: No such user %s\n", progname, fc.owner);
- X exit(4);
- X }
- X
- X uid = pw->pw_uid;
- X }
- X
- X if (fc.group == NULL)
- X gid = getgid();
- X else
- X {
- X struct group *gr;
- X
- X if ((gr = getgrnam(fc.group)) == NULL)
- X {
- X fprintf(stderr, "%s: No such group %s\n", progname, fc.group);
- X exit(5);
- X }
- X
- X gid = gr->gr_gid;
- X }
- X
- X /* this loop may seem a little strange */
- X /* each iteration through it is actually a new process */
- X for (;;)
- X {
- X char buf[BUFSIZ];
- X
- X /* remove any existing file or pipe */
- X unlink(fc.name);
- X
- X /* create the new pipe */
- X if (mknod(fc.name, fc.mode, 0))
- X {
- X fprintf(stderr, "%s: Can't create pipe %s (%s)\n",
- X progname, fc.name, strerror(errno));
- X exit(6);
- X }
- X
- X if (chown(fc.name, uid, gid))
- X {
- X fprintf(stderr, "%s: Can't change group and/or owner %s (%s)\n",
- X progname, fc.name, strerror(errno));
- X exit(7);
- X }
- X
- X /* this open will block until someone reads the other end */
- X if ((pipe_fp = fopen(fc.name, "wt")) == NULL)
- X {
- X fprintf(stderr, "%s: Can't open pipe %s (%s)\n",
- X progname, fc.name, strerror(errno));
- X exit(8);
- X }
- X
- X /* when we get here someone is reading the pipe we opened */
- X /* at this point we fork a new process to create the node */
- X /* again and block on opening it - this allows another process */
- X /* to open the same pipe and get the full file after a very */
- X /* short delay */
- X
- X /* note that error on fork doesn't stop us immediately */
- X if ((child = fork()) != 0)
- X {
- X /* open the command for reading */
- X if ((fp = popen(fc.cmd, "rt")) == NULL)
- X {
- X fprintf(stderr, "%s: Can't open command %s (%s)\n",
- X progname, fc.cmd, strerror(errno));
- X exit(9);
- X }
- X
- X /* shovel them bits */
- X while ((k = fread(buf, 1, BUFSIZ, fp)) != 0)
- X fwrite(buf, 1, k, pipe_fp);
- X
- X /* cleanup */
- X fclose(fp);
- X fclose(pipe_fp);
- X
- X /* now check for failed fork */
- X if (child == -1)
- X {
- X fprintf(stderr, "%s: Can't fork for next %s (%s)\n",
- X progname, fc.name, strerror(errno));
- X exit(10);
- X }
- X
- X /* exit in any case but with no error */
- X exit(0);
- X }
- X
- X /* close the pipe */
- X fclose(pipe_fp);
- X }
- }
- X
- /* start the bubble machine */
- int main(int argc, char **argv)
- {
- X FILE *fp;
- X int k, nents;
- X
- X /* set umask so that config file has full control */
- X umask(0);
- X
- X /* get the program name for error messages */
- X if ((progname = strrchr(argv[0], '/')) == NULL)
- X progname = argv[0];
- X else
- X progname++;
- X
- X /* we expect one and only one argument currently */
- X if (argc != 2)
- X {
- X fprintf(stderr, "Usage: %s config_file\n", progname);
- X exit(1);
- X }
- X
- X /* give it its own process group */
- X setpgrp();
- X
- X /* open the configuration file */
- X if ((fp = fopen(argv[1], "rt")) == NULL)
- X {
- X fprintf(stderr, "%s: Can't open configuration file (%s)\n",
- X progname, strerror(errno));
- X exit(2);
- X }
- X
- X /* and read it */
- X if (!(nents = readcfg(fp)))
- X exit(errno);
- X
- X /* start a process for each active line */
- X for (k = 0; k < nents; k++)
- X feedpipe(fp_cfg[k]);
- X
- X /* free the memory in the parent process and exit */
- X free(fp_cfg);
- X return(0);
- }
- SHAR_EOF
- chmod 0640 feedpipe.c ||
- echo 'restore of feedpipe.c failed'
- Wc_c="`wc -c < 'feedpipe.c'`"
- test 4306 -eq "$Wc_c" ||
- echo 'feedpipe.c: original size 4306, current size' "$Wc_c"
- # ============= readcfg.c ==============
- sed 's/^X//' << 'SHAR_EOF' > 'readcfg.c' &&
- /*
- readcfg.c
- Written by D'Arcy J.M. Cain
- X
- Reads configuration file for feedpipe
- fills in the fp_cfg array and returns the number of active lines
- */
- X
- #include <stdio.h>
- #include <stdlib.h>
- #include <string.h>
- #include <ctype.h>
- #include <malloc.h>
- #include "feedpipe.h"
- X
- int readcfg(FILE *fp)
- {
- X char *str;
- X int nents = 0, k;
- X
- X if ((fp_cfg = malloc(1)) == NULL)
- X return(0);
- X
- X while ((str = xgetline(fp, 1)) != NULL)
- X {
- X if ((fp_cfg = realloc(fp_cfg, sizeof(FP_CFG) * (nents+1))) == NULL)
- X {
- X free(str);
- X return(0);
- X }
- X
- X if ((fp_cfg[nents].name = strtok(str, " \t")) == NULL ||
- X (fp_cfg[nents].owner = strtok(NULL, " \t")) == NULL ||
- X (fp_cfg[nents].group = strtok(NULL, " \t")) == NULL )
- X {
- X free(fp_cfg);
- X fprintf(stderr, "%s: Invalid configuration for \"%s\"\n",
- X progname, str);
- X return(0);
- X }
- X
- X if (!strcmp(fp_cfg[nents].owner, "-"))
- X fp_cfg[nents].owner = NULL;
- X
- X if (!strcmp(fp_cfg[nents].group, "-"))
- X fp_cfg[nents].group = NULL;
- X
- X fp_cfg[nents].cmd = fp_cfg[nents].group;
- X
- X while (*fp_cfg[nents].cmd++)
- X ;
- X
- X fp_cfg[nents].mode = strtol(fp_cfg[nents].cmd, &fp_cfg[nents].cmd, 0);
- X
- X while (isspace(*fp_cfg[nents].cmd))
- X *fp_cfg[nents].cmd++ = 0;
- X
- X if (!*fp_cfg[nents].cmd)
- X {
- X free(fp_cfg);
- X fprintf(stderr, "%s: Invalid configuration for \"%s\"\n",
- X progname, str);
- X return(0);
- X }
- X
- X for (k = 0; k < nents; k++)
- X {
- X if (!strcmp(fp_cfg[k].name, fp_cfg[nents].name))
- X {
- X free(fp_cfg);
- X fprintf(stderr, "%s: Duplicate pipe \"%s\"\n", progname, str);
- X return(0);
- X }
- X }
- X
- X nents++;
- X }
- X
- X if (!nents)
- X free(fp_cfg);
- X
- X return(nents);
- }
- SHAR_EOF
- chmod 0640 readcfg.c ||
- echo 'restore of readcfg.c failed'
- Wc_c="`wc -c < 'readcfg.c'`"
- test 1610 -eq "$Wc_c" ||
- echo 'readcfg.c: original size 1610, current size' "$Wc_c"
- # ============= getline.c ==============
- sed 's/^X//' << 'SHAR_EOF' > 'getline.c' &&
- /*
- NAME
- X getline, xgetline, wgetline
- X
- SYNOPSIS
- X char *getline(FILE *fp, int exclusive);
- X char *xgetline(FILE *fp, int exclusive);
- X char *wgetline(WINDOW win, int exclusive);
- X
- DESCRIPTION
- X Reads a line from the stream given by fp (or from the window given by
- X win in wgetline) and returns a pointer to the string. There is no
- X length restriction on the returned string. Space is dynamically
- X allocated for the string as needed. If the exclusive flag is set then
- X the space won't be reused on the next call.
- X
- X In the xgetline version anything from '#' till the end of line is
- X ignored and A trailing '\' character is treated as a continuation
- X character. After this processing the resulting line is ignored if
- X it is empty. The '#' and '\' characters can be included by preceding
- X them with a '\'. Note that the leading backslash is left in the input
- X string and must be dealt with by the caller. This can be somewhat of a
- X problem at the end of a line but in general should be workable.
- X
- X When the exclusive flag is set the space is made available to the
- X caller on the same basis as malloc(3). When finished with the
- X string it should be free'ed.
- X
- RETURNS
- X A pointer to the string without the terminating newline is returned
- X if successful or NULL if there was an error or end of file. Use
- X feof(3) and ferror(3) to find out if it was a file error, memory
- X allocation problem or EOF condition.
- X
- AUTHOR
- X D'Arcy J.M. Cain (darcy@druid.UUCP)
- X D'Arcy Cain Consulting
- X
- CAVEATS
- X This function is in the public domain.
- */
- X
- #include <stdio.h>
- #include <errno.h>
- #include <malloc.h>
- X
- /* ascii.h defines the CTRL macro */
- #include <ascii.h>
- X
- /* I originally was going to use 80 here as the most common case but */
- /* decided that a few extra bytes to save a malloc from time to time */
- /* would be a better choice. Comments welcome. */
- #define CHUNK 128
- X
- #ifdef XCAT
- #define XGETLINE_VERSION
- #endif
- X
- #ifdef CURSES_VERSION
- #include <curses.h>
- #ifdef KANDR
- char *wgetline(win, exclusive)
- WINDOW *win;
- int exclusive;
- #else
- char *wgetline(WINDOW *win, int exclusive)
- #endif
- #else
- #ifdef XGETLINE_VERSION
- #define getline xgetline
- #endif
- #ifdef KANDR
- char *getline(fp, exclusive)
- FILE *fp;
- int exclusive;
- #else
- char *getline(FILE *fp, int exclusive)
- #endif
- #endif
- {
- X static char *buf = NULL;
- X size_t sz = CHUNK; /* this keeps track of the current size of buffer */
- X size_t i = 0; /* index into string tracking current position */
- X char *ptr; /* since we may set buf to NULL before returning */
- X int c; /* to store getc return */
- #ifdef XGETLINE_VERSION
- X int in_comment = 0; /* if we are in a comment */
- #endif
- X
- X /* start out with buf set to CHUNK + 2 bytes */
- X /* note that if this routine was previously called with exclusive */
- X /* set that malloc rather than realloc will be called due to buf */
- X /* being set to NULL in the "if (exclusive) code at end of routine */
- X if (buf == NULL)
- X buf = (char *)(malloc(CHUNK + 2));
- X else
- X buf = (char *)(realloc(buf, CHUNK + 2));
- X
- X /* check for memory problem */
- X if (buf == NULL)
- X return(NULL);
- X
- #ifdef CURSES_VERSION
- X /* get characters from window until newline or carriage return */
- X while ((c = wgetch(win)) != '\n' && c != '\r')
- #else
- X /* get characters from stream until EOF */
- #ifdef XGETLINE_VERSION
- X while ((c = getc(fp)) != EOF)
- #else
- X while ((c = getc(fp)) != EOF && c != '\n')
- #endif
- #endif
- X {
- #ifdef XGETLINE_VERSION
- X buf[i] = c;
- X
- X /* new line only way to end comment */
- X if (c == '\n')
- X {
- X if (i)
- X break;
- X
- X in_comment = 0;
- X }
- X else if (in_comment)
- X {
- X /* continuation still ends comment - alternative would be silly */
- X if (c == '\\' && (c = getc(fp)) == '\n')
- X in_comment = 0;
- X }
- X else if (c == '#')
- X in_comment = 1;
- X else if (c == '\\')
- X {
- X if ((c = getc(fp)) != '\n' && c != EOF)
- X {
- X buf[i++] = '\\';
- X buf[i++] = c;
- X }
- X else
- X buf[i++] = ' ';
- X }
- X else
- X i++;
- X
- #else
- X /* the following needed in case we are in cbreak or raw mode */
- #ifdef CURSES_VERSION
- X if (c == CTRL('L'))
- X clearok(win, 1);
- X else
- #endif
- X if (c != '\b')
- X buf[i++] = c;
- X else if (i)
- X i--;
- #endif
- X
- X /* check for buffer overflow */
- X if (i >= sz)
- X if ((buf = (char *)(realloc(buf, (sz += CHUNK) + 2))) == NULL)
- X return(NULL);
- X }
- X
- X /* is there anything to return? */
- #ifndef CURSES_VERSION
- X if (c == EOF && !i)
- X {
- X free(buf);
- X buf = NULL;
- X return(NULL);
- X }
- #endif
- X
- X buf[i++] = 0; /* yes I want the ++ */
- X
- X /* the realloc may be overkill here in most cases - perhaps it */
- X /* should be moved to the 'if (exclusive)' block */
- X ptr = buf = (char *)(realloc(buf, i));
- X
- X /* prevent reuse if necessary */
- X if (exclusive)
- X buf = NULL;
- X
- X return(ptr);
- }
- X
- /* don't bother with TEST_MODULE if building curses version */
- /* most of the testing for the curses version can be done as getline */
- #ifdef TEST_MODULE
- int main(void)
- {
- X char *p;
- X
- X while ((p = getline(stdin, 0)) != NULL)
- X printf("%s\n", p);
- X
- X return(0);
- }
- #endif
- X
- #ifdef XCAT
- #include <string.h>
- X
- static void xcat(FILE *fp)
- {
- X char *p;
- X
- X while ((p = xgetline(fp, 0)) != NULL)
- X printf("%s\n", p);
- }
- X
- int main(int argc, char **argv)
- {
- X FILE *fp;
- X int k;
- X
- X if (argc < 2)
- X xcat(stdin);
- X else for (k = 1; k < argc; k++)
- X {
- X if ((fp = fopen(argv[k], "r")) == NULL)
- X fprintf(stderr, "xcat: Can't open file %s - %s\n",
- X argv[k], strerror(errno));
- X else
- X {
- X xcat(fp);
- X fclose(fp);
- X }
- X }
- X
- X return(0);
- }
- #endif
- X
- SHAR_EOF
- chmod 0640 getline.c ||
- echo 'restore of getline.c failed'
- Wc_c="`wc -c < 'getline.c'`"
- test 5377 -eq "$Wc_c" ||
- echo 'getline.c: original size 5377, current size' "$Wc_c"
- # ============= Makefile ==============
- sed 's/^X//' << 'SHAR_EOF' > 'Makefile' &&
- # Makefile for feedpipe
- # Written by D'Arcy J.M. Cain
- #
- X
- # If you put getline and friends in your local library as I do then replace
- # cain below with the library name. If not then remove the comment character
- # in the OBJECTS list to include xgetline.o there.
- LDLIBS = -lcain
- OBJECTS = feedpipe.o readcfg.o # xgetline.o
- X
- NAME = feedpipe
- CFLAGS= -O -Wall -ansi -pedantic -Wcast-qual -Wid-clash-31 \
- X -Wshadow -Wpointer-arith -Wwrite-strings -g
- BIN = /usr/lbin
- DIST = README feedpipe.1 feedpipe.c readcfg.c getline.c Makefile feedpipe.h
- feedpipe: $(OBJECTS)
- X
- clean:
- X rm -f *.o *.obj core test
- X
- clobber: clean
- X rm -f feedpipe $(NAME).0? $(NAME).gen
- X
- link:
- X ln $(LBINS) .
- X
- install: feedpipe
- X rm -f $(BIN)/feedpipe
- X chmod 711 feedpipe
- X ln feedpipe $(BIN)
- X
- dist: gen shar
- X
- # gen stuff needs my genfiles package
- gen: $(NAME).gen
- X
- $(NAME).gen: $(DIST)
- X mkscript $^ > $(NAME).gen
- X
- shar: $(NAME).01
- X
- $(NAME).01: $(DIST)
- X shar -vxfL 40 -o $(NAME) $^
- X chmod 644 $(NAME).01
- X rm -f /usr/spool/uucppublic/pub/distrib/$(NAME).shar
- X ln $(NAME).01 /usr/spool/uucppublic/pub/distrib/$(NAME).shar
- X
- strip: feedpipe
- X strip feedpipe
- X
- mcs: feedpipe
- X mcs -d feedpipe
- X
- # The following is to get the getline source into this directory for
- # distribution purposes since it is in my standard library and not
- # actually needed for building.
- X
- getline.c: ../library/getline.c
- X ln ../library/getline.c .
- X
- xgetline.o: getline.c
- X $(CC) $(CFLAGS) -DXGETLINE_VERSION -c getline.c -o xgetline.o
- X
- # not needed in feedpipe but it's available in getline anyway
- wgetline.o: getline.c
- X $(CC) $(CFLAGS) -DCURSES_VERSION -c getline.c -o wgetline.o
- X
- SHAR_EOF
- chmod 0664 Makefile ||
- echo 'restore of Makefile failed'
- Wc_c="`wc -c < 'Makefile'`"
- test 1613 -eq "$Wc_c" ||
- echo 'Makefile: original size 1613, current size' "$Wc_c"
- # ============= feedpipe.h ==============
- sed 's/^X//' << 'SHAR_EOF' > 'feedpipe.h' &&
- /*
- feedpipe.h
- Written by D'Arcy J.M. Cain
- X
- header file for feedpipe
- */
- X
- typedef struct {
- X char *name; /* name of the pipe */
- X char *cmd; /* command to feed to pipe */
- X char *owner; /* file owner */
- X char *group; /* file group */
- X int mode; /* file mode */
- } FP_CFG;
- X
- extern FP_CFG *fp_cfg;
- extern char *progname;
- extern int readcfg(FILE *fp);
- SHAR_EOF
- chmod 0640 feedpipe.h ||
- echo 'restore of feedpipe.h failed'
- Wc_c="`wc -c < 'feedpipe.h'`"
- test 351 -eq "$Wc_c" ||
- echo 'feedpipe.h: original size 351, current size' "$Wc_c"
- exit 0
- --
- D'Arcy J.M. Cain (darcy@druid) |
- D'Arcy Cain Consulting | There's no government
- Toronto, Ontario, Canada | like no government!
- +1 416 424 2871 DoD#0082 |
-
- exit 0 # Just in case...
- --
- Kent Landfield INTERNET: kent@sparky.IMD.Sterling.COM
- Sterling Software, IMD UUCP: uunet!sparky!kent
- Phone: (402) 291-8300 FAX: (402) 291-4362
- Please send comp.sources.misc-related mail to kent@uunet.uu.net.
-